//
// @Auther: by wujehy 
// @Email:wujehy@qq.com
// @Data:20-4-13
// @Time:下午5:16
//

#ifndef TESTSERVER_SINGLESERVER_H
#define TESTSERVER_SINGLESERVER_H

#include "BaseServer.h"
#include <iostream>
#include <map>
#include <handy/handy.h>
#include <Business/EventManager.h>
/**
 * @brief 但线程的实现
 */
using namespace handy;

class SingleServer : public BaseServer
{
private:
    // 事件管理 器
    EventManager eventManager;
public:
    int startServer() override;

    virtual ~SingleServer();

    /**
     * @brief 关闭连接的事件
     * @param con
     * @return
     */
    int ConnentCloseEvent(const TcpConnPtr &con);

    int ConnentHello(const TcpConnPtr &con ,  std::string errorMsgData);


};


#endif //TESTSERVER_SINGLESERVER_H
